package com.breakfast.fun.ui.home.product;

import com.breakfast.fun.data.entity.home.product.ProductDetail;
import com.breakfast.fun.data.entity.home.product.ProductState;
import com.breakfast.fun.util.Api;
import com.breakfast.fun.util.RxSchedulers;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by Administrator on 2016/9/6.
 */
public class NormalProductModel implements NormalProductContract.Model {
    @Override
    public Observable<ProductState> getProductStateModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getProductStateModel(map)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<ProductDetail> getProductDetailModel(@FieldMap Map<String, String> map) {
        return Api.getInstance().service
                .getProductDetailModel(map)
                .compose(RxSchedulers.io_main());
    }
}
